﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class MyThread : TestThread
    {
        protected override void Process()
        {
            Console.WriteLine("do my something");
            Thread.Sleep(1000);
        }
    }


    class Program
    {
        static void Main(string[] args)
        {
            MyThread thread = new MyThread();

            Console.WriteLine("start thread");
            thread.Start();
            Console.WriteLine(thread.ReadState());
            Thread.Sleep(3000);

            thread.Pause();

            while (true)
            {
                Thread.Sleep(1);
            }

            //Console.WriteLine("pause thread");
            //thread.Pause();
            //Console.WriteLine(thread.ReadState());
            //Thread.Sleep(3000);

            //Console.WriteLine("resume thread");
            //thread.Resume();
            //Console.WriteLine(thread.ReadState());
            //Thread.Sleep(3000);

            //Console.WriteLine("stop thread");
            //thread.Stop();
            //Console.WriteLine(thread.ReadState());
            //Thread.Sleep(3000);

            //Console.WriteLine("start thread");
            //thread.Start();
            //Console.WriteLine(thread.ReadState());
            //Thread.Sleep(3000);

            //Console.WriteLine("pause thread");
            //thread.Pause();
            //Console.WriteLine(thread.ReadState());
            //Thread.Sleep(3000);

            //Console.WriteLine("resume thread");
            //thread.Resume();
            //Console.WriteLine(thread.ReadState());
            //Thread.Sleep(3000);

            //Console.WriteLine("stop thread");
            //thread.Stop();
            //Console.WriteLine(thread.ReadState());
            //Thread.Sleep(3000);

        }
    }
}
